package models

import (
	"gorm.io/gorm"
)

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(100);comment:'用户name'"`
	Password string `gorm:"type:varchar(100);comment:'用户password'"`
}
type News struct {
	gorm.Model
	Title   string `gorm:"type:varchar(100);comment:'小说title'"`
	Picture string `gorm:"type:varchar(100);comment:'小说picture'"`
	Content string `gorm:"type:text;comment:'小说content'"`
	Uid     int    `gorm:"type:int;comment:'用户uid'"`
	Num     int    `gorm:"type:int;comment:'阅读量'"`
}

type Records struct {
	gorm.Model
	Uid int `gorm:"type:int;comment:'用户id'"`
	Nid int `gorm:"type:int;comment:'小说id'"`
	Num int `gorm:"type:int;comment:'阅读数量'"`
}
